//
//  DKTextField.h
//  DKTextField
//
//  Created by 张奥 on 14-10-31.
//  Copyright (c) 2014年 DKHS. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "UITextField+Extension.h"

typedef NS_OPTIONS(NSUInteger,MCTextFieldType)
{
    MCTextFieldDefault,
    MCTextFieldIdCard,//身份证
    MCTextFieldPhone,//手机号
    MCTextFieldCode,//验证码
    MCTextFieldPWD,//密码
    MCTextFieldSQL,//数据库50位
    
};


@interface HLTextField : UITextField
/**
 * The amount to inset the text by, or zero to use default behavior
 */
@property (nonatomic, assign) MCTextFieldType textFieldType;

@property (nonatomic, assign) UIEdgeInsets textInsets;

@property (nonatomic, assign) UIEdgeInsets placeholderInsets;

- (instancetype)initWithIsPW:(BOOL)isPassWord;

@end


/*
 
 //账号框
 _accountField =[UITextField new];
 _accountField.placeholder = @"用户名/邮箱/手机号";
 _accountField.textColor = [UIColor blackColor];
 _accountField.autocapitalizationType = UITextAutocapitalizationTypeNone;//首字母是否大写
 _accountField.borderStyle=UITextBorderStyleNone; //外框类型
 _accountField.delegate = self;//设置代理 用于实现协议
 _accountField.returnKeyType = UIReturnKeyNext;//设置键盘按键类型
 _accountField.clearButtonMode = UITextFieldViewModeWhileEditing;//UITextField 的一件清除按钮是否出现
 _accountField.enablesReturnKeyAutomatically = YES;//这里设置为无文字就灰色不可点
 [_accountField setLeftViewMode:UITextFieldViewModeAlways];
 [_accountField setLeftView:[_LolitaFunctions leftViewForTextFieldWithTest:@"账号："]];
 UIView *view = [[UIView alloc] initWithFrame:CGRectMake(80, 60.5, loginBg.size.width-80, 0.5)];
 view.alpha = 0.5;
 view.backgroundColor = [UIColor grayColor];
 [loginBg addSubview:view];
 //密码框
 _passwordField = [DKTextField new];
 _passwordField.placeholder = @"请输入密码";
 _passwordField.textColor = [UIColor blackColor];
 _passwordField.secureTextEntry = YES;//是否以密码形式显示
 _passwordField.delegate = self;
 _passwordField.returnKeyType = UIReturnKeyDone;
 _passwordField.clearButtonMode = UITextFieldViewModeWhileEditing;
 _passwordField.enablesReturnKeyAutomatically = YES;
 [_passwordField setLeftViewMode:UITextFieldViewModeAlways];
 [_passwordField setLeftView:[_LolitaFunctions leftViewForTextFieldWithTest:@"密码："]];
 */
